@include breakpoint($mq-col2) {
  #main-wrap {
    --main-max-width: auto;
  }
}

$chat-optimal-size: calc(100vh - #{$site-header-outer-height} - #{$block-gap} - 3rem);

.swiss {
  display: grid;

  &__side {
    grid-area: side;
  }

  &__table {
    grid-area: table;
  }

  &__main {
    grid-area: main;
  }

  .chat__members {
    grid-area: uchat;
  }

  .swiss__board__top {
    display: none;
  }

  grid-template-areas: 'main' 'side' 'uchat' 'table';
  grid-gap: $block-gap;

  @include breakpoint($mq-col2) {
    grid-template-columns: $col2-uniboard-default-width $col2-uniboard-table;
    grid-template-rows: $chat-optimal-size min-content;
    grid-template-areas: 'main  side' 'main  uchat' 'table table';

    .mchat__messages {
      max-height: inherit;
    }
  }

  @include breakpoint($mq-col3) {
    grid-template-columns: $col3-uniboard-side $col3-uniboard-default-width $col3-uniboard-table;
    grid-template-rows: $chat-optimal-size auto;
    grid-template-areas: 'side  main table' 'uchat main table';

    .swiss__board__top {
      display: block;
    }
  }
}
